<template>
	<u-tabbar
			z-index='9999'
			:value="valueModel"
			@change="change"
			:fixed="true"
			:placeholder="true"
			:safeAreaInsetBottom="true"
		>
		<u-tabbar-item text="首页" icon="home"></u-tabbar-item>
		<u-tabbar-item text="工作台" icon="grid"></u-tabbar-item>
		<u-tabbar-item text="我的" icon="account"></u-tabbar-item>
	</u-tabbar>
</template>
<script>
	export default {
		props: {
			valueModel: {
                type: Number,
				default: 0,
			}
		},
		data() {
			return {
				list: [
					{
						path: "/pages/tabBar/index/index"
					},
					{
						path: "/pages/tabBar/workbench/workbench"
					},
					{
						path: "/pages/tabBar/account/account"
					},
				]
			}
		},
		methods: {
			change(e) {
				uni.switchTab({
					url: this.list[e].path
				})
			}
		}
	}
</script>

<style>

</style>
